package com.lap.auth.application.user.dto;

import com.lap.framework.common.dto.AbstractDto;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
@Schema(description = "用户包括组织数据传输")
public class UserWithOrgDto extends AbstractDto {

  @Schema(description = "唯一标识")
  private Integer id;

  @Schema(description = "用户名")
  private String userName;

  @Schema(description = "姓名")
  private String fullName;

  @Schema(description = "邮箱")
  private String email;

  @Schema(description = "组织集合")
  private List<Integer> orgPaths;

  @Schema(description = "职位")
  private Integer jobId;

  @Schema(description = "状态")
  private Integer status;

  @Schema(description = "状态描述")
  private String remark;

  @Schema(description = "有效期")
  private LocalDate termValidity;

  @Schema(description = "版本")
  private Long version;

  @Schema(description = "职位")
  private Job job;

  @Schema(description = "职位数据")
  public record Job(
      @Schema(description = "职位id") Integer id, @Schema(description = "职位名称") String name)
      implements Serializable {}
}
